package jfrederick8;

public class GrenadeLauncher extends Weapon{
	private Grenade g, grenTemp;
	
	//classRestriction and proficiencyRestriction will probably need to be hard-coded here.
	public GrenadeLauncher(int[] stats, String name, int effect, int effectDuration, int factionRestriction, int classRestriction, boolean equipped){
		super(stats, name, "This gun launches grenades as ammo, allowing them to go further than when thrown by hand", "Heavy Weapons", 11000, 4, effect, effectDuration, factionRestriction, classRestriction, 5, 3, equipped, true, 25, false, (Integer)null, (Integer)null, (Integer)null);
		g = (Grenade)null;
		grenTemp = (Grenade)null;
	}//end constructor GrenadeLauncher
	
	public boolean loadGrenades(Grenade gren){
		if(g == null){
			g = gren;
			return true;
		} else {
			return false;
		}
	}//end method loadGrenade
	
	public Grenade switchGrenades(Grenade gren){
		grenTemp = g;
		g = gren;
		return grenTemp;
	}//end method switchGrenades
	
	public Grenade takeGrenades(){
		grenTemp = g;
		g = (Grenade)null;
		return grenTemp;
	}//end method takeGrenade
}//end class GrenadeLauncher
